Event handler not working on dynamic content even with event delegation